#include<stdio.h>
int main ()
{
    float H, faHeight, moHeight;
    char sex, sports, diet;
    printf("please enter sex,diet,sports:");
    printf("please enter faHeight,moHeight:\n");
    scanf("%c,%c,%c,%f,%f\n",&sex,&diet,&sports,&faHeight,&moHeight);
    if(sex=='F')
      if(diet=='Y')
      if(sports=='Y')
      H=(faHeight*0.923+moHeight)/2*1.02*1.015;
      else
      H=(faHeight*0.923+moHeight)/2*1.015;
    else
      if(sports=='Y')
      H=(faHeight*0.923+moHeight)/2*1.02;
      else
      H=(faHeight*0.923+moHeight)/2;
    else
      if(diet=='Y')
        if(sports=='Y')
        H=(faHeight+moHeight)*0.54*1.02*1.015;
        else
        H=(faHeight+moHeight)*0.54*1.015;
      else
        if(sports=='Y')
        H=(faHeight+moHeight)*0.54*1.02;
        else
        H=(faHeight+moHeight)*0.54;
    printf("H=%6.2fcm\n",H);
    return 0;
}
